from nvcr.io/nvidia/l4t-base:r32.4.3
#docker build -t xyz:2.0.0 -f l4t-ros.dockerfile .

RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \
sed -i "s@http://ports.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone  && \
apt update && apt install -y gpg curl software-properties-common python3.7 openssh-server vim net-tools && \
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && echo "root:root" | chpasswd && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/'  /etc/ssh/sshd_config && \
sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' /etc/ssh/sshd_config && \
sed -i 's/#AddressFamily any/AddressFamily any/' /etc/ssh/sshd_config && \
sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config

RUN apt install -y dirmngr && \
apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE && \
add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo bionic main" -u && apt update && apt-get install -y librealsense2-utils 
